import threading
import requests


def task():
    res = requests.get('http://127.0.0.1:8000/goods/goods/seckill/')
    print(res.text)


if __name__ == '__main__':
    # 创建多个线程
    threads = []
    for i in range(10):
        t = threading.Thread(target=task)
        threads.append(t)
        t.start()
    for j in threads:
        j.join()

